from django.db import models
# from django.contrib.auth.models import AbstractUser
#
# from utils.models import CommonModel

class Profile(models.Model):
    """ 用户浏览详细信息 """
    appId = models.CharField('APP', max_length=64)
    userId = models.CharField('用户', max_length=32)
    objectId = models.CharField('商品', max_length=32)
    objectType = models.CharField('商品类型', max_length=32)
    motion = models.CharField('用户行为', max_length=32)
    visitTime = models.CharField('行为时间', max_length=32)
    created_at = models.DateTimeField('创建时间', auto_now_add=True)
    updated_at = models.DateTimeField('修改时间', auto_now=True)

    class Meta:
        db_table = 'rec_profile'

class RecProfileOut(models.Model):
    appId = models.CharField('APP', max_length=64)
    userId = models.CharField('用户', max_length=32)
    objectId = models.CharField('商品', max_length=32)
    objectType = models.CharField('商品类型', max_length=32)
    motion = models.CharField('用户行为', max_length=32)
    visitTime = models.CharField('行为时间', max_length=32)
    created_at = models.DateTimeField('创建时间', auto_now_add=True)
    updated_at = models.DateTimeField('修改时间', auto_now=True)
    location = models.CharField('坑位位置', max_length=32)
    method = models.CharField('对比模型', max_length=32)
    item1 = models.CharField('产品1', max_length=32, null=True)
    score1 = models.CharField('分数1', max_length=32, null=True)
    item2 = models.CharField('产品2', max_length=32, null=True)
    score2 = models.CharField('分数2', max_length=32, null=True)
    item3 = models.CharField('产品3', max_length=32, null=True)
    score3 = models.CharField('分数3', max_length=32, null=True)
    item4 = models.CharField('产品4', max_length=32, null=True)
    score4 = models.CharField('分数4', max_length=32, null=True)
    item5 = models.CharField('产品5', max_length=32, null=True)
    score5 = models.CharField('分数5', max_length=32, null=True)
    item6 = models.CharField('产品6', max_length=32, null=True)
    score6 = models.CharField('分数6', max_length=32, null=True)
    item7 = models.CharField('产品7', max_length=32, null=True)
    score7 = models.CharField('分数7', max_length=32, null=True)
    item8 = models.CharField('产品8', max_length=32, null=True)
    score8 = models.CharField('分数8', max_length=32, null=True)
    item9 = models.CharField('产品9', max_length=32, null=True)
    score9 = models.CharField('分数9', max_length=32, null=True)
    item10 = models.CharField('产品10', max_length=32, null=True)
    score10 = models.CharField('分数10', max_length=32, null=True)

    class Meta:
        db_table = 'rec_profile_out'

class Exporsure(models.Model):
    appId = models.CharField('APP', max_length=64)
    userId = models.CharField('用户', max_length=32)
    location = models.CharField('坑位位置', max_length=32)
    visitTime = models.CharField('行为时间', max_length=32)
    created_at = models.DateTimeField('创建时间', auto_now_add=True)
    updated_at = models.DateTimeField('修改时间', auto_now=True)

    class Meta:
        db_table = 'exporsure_out'

class HotItem(models.Model):
    appId = models.CharField('APP', max_length=64)
    item1 = models.CharField('产品1', max_length=32, null=True)
    score1 = models.CharField('分数1', max_length=32, null=True)
    item2 = models.CharField('产品2', max_length=32, null=True)
    score2 = models.CharField('分数2', max_length=32, null=True)
    item3 = models.CharField('产品3', max_length=32, null=True)
    score3 = models.CharField('分数3', max_length=32, null=True)
    item4 = models.CharField('产品4', max_length=32, null=True)
    score4 = models.CharField('分数4', max_length=32, null=True)
    item5 = models.CharField('产品5', max_length=32, null=True)
    score5 = models.CharField('分数5', max_length=32, null=True)
    item6 = models.CharField('产品6', max_length=32, null=True)
    score6 = models.CharField('分数6', max_length=32, null=True)
    item7 = models.CharField('产品7', max_length=32, null=True)
    score7 = models.CharField('分数7', max_length=32, null=True)
    item8 = models.CharField('产品8', max_length=32, null=True)
    score8 = models.CharField('分数8', max_length=32, null=True)
    item9 = models.CharField('产品9', max_length=32, null=True)
    score9 = models.CharField('分数9', max_length=32, null=True)
    item10 = models.CharField('产品10', max_length=32, null=True)
    score10 = models.CharField('分数10', max_length=32, null=True)

    class Meta:
        db_table = 'hotItem_out'